import request from '@/utils/request'

// 注册
export const register = (data) => {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 登录
export const login = (data) => {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}
// 获取用户基本信息
export const getUser = () => {
  return request({
    url: '/users/me'
  })
}
// 获取用户详情信息
export const getUserDetail = (id) => {
  return request({
    url: `/users/${id}`
  })
}
